import request from '@/utils/request'

// 查询责任书列表
export function listDuty(query) {
	return request({
		url: '/spm/duty/list',
		method: 'get',
		params: query
	})
}

// 查询责任书详细
export function getDuty(fileId) {
	return request({
		url: '/spm/duty/' + fileId,
		method: 'get'
	})
}

// 新增责任书
export function addDuty(data) {
	return request({
		url: '/spm/duty',
		method: 'post',
		data: data
	})
}

// 修改责任书
export function updateDuty(data) {
	return request({
		url: '/spm/duty',
		method: 'put',
		data: data
	})
}

// 删除责任书
export function delDuty(fileId) {
	return request({
		url: '/spm/duty/' + fileId,
		method: 'delete'
	})
}